{include file="public/header" /}
{php}
	$role_status = model('AdminRole')->is_acl('checkbox?field_name=status');
{/php}
<ul class="tab-label">
	<li class="on">{$_cur_title}</li>
	<li class="jump" url="{:url('recycle')}">回收站</li>
</ul>
<table class="data-list">
	<tbody>
		<tr>
			<th width="200">标题</th>
			<th>链接</th>
			<th width="50">排序</th>
			<th width="50" {$role_status}>状态</th>
			<th width="120">操作</th>
		</tr>
		{volist name="list" id="rs"}
			<tr class="data-{$rs['menu_id']}">
				<td><input type="hidden" name="id_arr[]" value="{$rs['menu_id']}">{$rs['prefix_title']}</td>
				<td>{$rs['url']}</td>
				<td>
					<input class="ta-c" type="text" name="order_id[{$rs['menu_id']}]" value="{$rs['order_id'] == 99 ? '' : $rs['order_id']}">
				</td>
				<td {$role_status}>
					<input class="ajax_checkbox" url="{:url('checkbox', array('field_name' => 'status', 'pk_val' => $rs['menu_id'],'pk_key'=>'menu_id'))}" type="checkbox" value="1" {$rs['status'] ? 'checked' : ''}>
				</td>
				<td>
					<a class="btn btn-default" href="{:url('edit', array('menu_id' => $rs['menu_id']))}" title="修改">
						<i class="icon-edit"></i>
					</a>
					<a class="btn btn-default confirm-opt" href="{:url('del', array('menu_id' => $rs['menu_id']))}" title="删除" msg="您确认要删除此菜单？" del-class="data-{$rs['menu_id']}">
						<i class="icon-delete"></i>
					</a>
				</td>
			</tr>
		{/volist}
	</tbody>
</table>

<div class="opt-page-box">
	<ul class="button-group">
		<li class="btn bg-default jump" url="{:url('add')}"><i class="icon-plus"></i>添加</li>
		<li class="btn bg-default batch-edit" url="{:url('index')}"><i class="icon-sort"></i>排序</li>
		<li class="btn bg-default confirm-opt" url="{:URL('update_menu')}" msg="您确定要同步当前菜单到微信平台"><i class="icon-update"></i>同步至微信</li>
	</ul>
	{$page}
</div>

{include file="public/footer" /}